<template>
	<view>
		<view class="content" >
			<view class="title">
				{{title}}
			</view>
			<view class="art-content">
				<rich-text class="richText" :nodes="content"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				content:''
			}
		},
		methods: {
			
		},
		onLoad(e) {
			uni.showLoading({
				title:'加载中.....'
			})
			console.log(e);
			uni.request({
				url:'https://unidemo.dcloud.net.cn/api/news/36kr/'+e.newsid,
				method:'GET',
				data:{},
				success: res => {
					console.log(res);
					this.title = res.data.title;
					this.content = res.data.content;
					setTimeout(function(){
					uni.hideLoading();
					},100)
						
					
				},
				fail: () => {
					
				},
				complete: () => {
					
				}
			});
		}
	}
</script>

<style>
.content{
	padding: 10upx 4%;
	width: 92%;
	flex-wrap: wrap;
}
.title{
	line-height: 2em;
	font-weight: 700;
	font-size: 38upx;
}
.art-content{
	line-height: 2em;
}
</style>
